home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 36
/
Amiga Format CD36 (1999-01-22)(Future Publishing)(GB)[!][issue 1999-02].iso
/
-seriously_amiga-
/
misc
/
megabook
/
fileconv
/
source
/
fileio.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-12-12
|
1KB
|
54 lines
/*
** FileIO header for MegaBook v3
** By Tom Bampton
**
** © 1996 Eden Software
**
** This is from the original Version 3 sources, there is currently no
** converter for converting to the new format as it's unnecessary.
**
** The preview version of MegaBook 4 wont load/save ancient V2 format files
** yet (except with the arexx script LoadOld.mbx) so I left this here for now.
*/
/*
MegaBook v3 File Format:
struct MegaBookHead
struct MegaBookRec (amount in Header->records)
: :
: :
EOF
*/
struct MegaBookHead
{
int id; /* ID */
int records; /* number of records */
char future[24]; /* for future use */
};
struct MegaBookRec
{
int id; /* ID */
char name[51]; /* name */
char addr[51]; /* address */
char blnk[51]; /* blank thingy */
char town[51]; /* town */
char county[51]; /* county */
char pcode[51]; /* post code */
char fone[51]; /* depends on cy1 */
char fax[51]; /* depends on cy2 */
int cy1; /* active for first cycle */
int cy2; /* active for second cycle */
};
#define MAKE_ID(a,b,c,d) ((ULONG)(a)<<24|(ULONG)(b)<<16|(ULONG)(c)<<8|(ULONG)(d))
/* ID's */
#define ID_HEAD MAKE_ID('M','B','3','0') /* Header ID */
#define ID_RECORD MAKE_ID('M','B','R','C') /* Record ID */